package com.xj0927.cloudalibaba.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author: xj0927
 * @Description:
 * @Date Created in 2020-11-03 11:07
 * @Modified By:
 */
@Configuration
public class ApplicationContextConfig {

    @Bean
    @LoadBalanced  //负载均衡
    public RestTemplate getTemplate(){
        return new RestTemplate();
    }
}
